 <!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title></title>
    <style>
        .divCL
        {
            width: 200px;
            height: 200px;
            background-color: orange;
        }

        .divCL2
        {
            width: 100px;
            height: 100px;
            background-color: red;
        }
    </style>
</head>

<body>
    <div id="app">
        <div>{{message}}</div>
        <div class="divCL" @click="divClick"> <div class="divCL2" v-on:click.stop="btnClick">按钮</div></div>
    </div>
    <script src="../lib/Vue.js"></script>
    <script>
        const app = Vue.createApp({
            data: function () {
                return {
                    message:"我是谁？",
                    isActive:true
                }
            },
            methods: {
               btnClick:function(newVal,oldVal)
               {
                  this.message="我是老表";
                  console.log(this.message);
               },
               divClick:function()
               {
                 console.log("我被点击了");
               }
            }
        });
        app.mount("#app");
    </script>
</body>

</html>